<template>
	<div class="no-ai-service-auth">
		<div>
			<img class="auth-img" src="@/global-assets/imgs/no-algo-auth.png" />
			<p class="auth-text">{{ text }}</p>
			<a-button type="primary" class="auth-btn" @click="toAlgoAuth">去授权</a-button>
		</div>
	</div>
</template>

<script lang="ts" setup>
defineProps({
	text: {
		type: String,
		default: '当前未进行算法授权，请授权后使用本功能'
	},
	modelwidth: {
		type: String,
		default: '100%'
	},
	btnwidth: {
		type: String,
		default: '136px'
	}
});
const router = useRouter();
/**
 * 跳转算法授权
 */
const toAlgoAuth = () => {
	router.push({
		path: '/config-manage/algo-auth'
	});
};
</script>

<style lang="less" scoped>
.no-ai-service-auth {
	display: flex;
	width: v-bind(modelwidth);
	height: 100%;
	padding: 0 20px;
	text-align: center;
	align-items: center;
	justify-content: center;

	.auth-img {
		width: 91px;
	}

	.auth-text {
		margin-top: 14px;
		margin-bottom: 24px;
		font-size: 14px;
		font-weight: 400;
		line-height: 22px;
		text-align: center;
		color: @text03;
	}

	.auth-btn {
		width: v-bind(btnwidth);
		// width: 136px;
		border: none;
		border-radius: 8px;
		background: linear-gradient(180deg, rgba(1, 161, 255, 1) 0%, rgba(7, 94, 233, 1) 100%);

		&:hover {
			background: linear-gradient(180deg, rgba(1, 161, 255, 0.9) 0%, rgba(7, 94, 233, 0.9) 100%);
		}
	}
}
</style>
